<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>PCMS内容管理系统</title>
<link href="<?php echo $_tpl['css']; ?>admin.css" rel="stylesheet" type="text/css" />
</head>
<body style='width:98%;'>
<form method="get">
<table width="99%" border="0" align="center" cellpadding="5" cellspacing="1">
	<tr>
		<td height="20" colspan="16">
			<input class="btn2" type="button" onclick="window.location.href='add_privilege.php?reference=<?php echo $current_url; ?>';" value="添加" />
			 类型 <select name="type_id" id="type_id">
				<option value=""></option>
			<?php
				foreach( $privilege_type_array as $value )
				{
			?>
				<option value="<?php echo $value['id']; ?>"<?php if ( $type_id == $value['id'] ) echo ' selected'; ?>><?php echo $value['name']; ?></option>
			<?php
				}
			?>
			</select> 名称 <input type="text" name="name" id="name" value="<?php echo $name; ?>"> <input type="submit" value="提交">
		</td>
	</tr>
	<tr>
		<td height="20" align="left" bgcolor="#000000"><span class="bold">编号</span></td>
		<td height="20" align="left" bgcolor="#000000"><span class="bold">类型</span></td>
		<td height="20" align="left" bgcolor="#000000"><span class="bold">名称</span></td>
		<td height="20" align="left" bgcolor="#000000"><span class="bold">操作</span></td>
	</tr>
<?php
	foreach( $data as $index => $value )
	{
		$bgcolor = $index % 2 ? '#323232' : '#272727';
?>
	<tr>
		<td height="20" align="left" bgcolor="<?php echo $bgcolor; ?>"><?php echo $value['id']; ?></td>
		<td height="20" align="left" bgcolor="<?php echo $bgcolor; ?>"><?php echo $value['type_name']; ?></td>
		<td height="20" align="left" bgcolor="<?php echo $bgcolor; ?>"><?php echo $value['name']; ?></td>
		<td height="20" align="left" bgcolor="<?php echo $bgcolor; ?>"><a href="set_privilege.php?id=<?php echo $value['id']; ?>">修改</a></td>
	</tr>
<?php
	}
?>
<?php
	if ( isset( $bar ) )
	{
?>
	<tr>
		<td height="20" colspan="16" align="center" bgcolor="#000000">
			<table width="30%"><tr align="center"><td><a href="<?php echo $bar['first_link']; ?>">首页</a></td><td><a href="<?php echo $bar['prev_link']; ?>">上一页</a></td><td><?php echo $bar['current']; ?> / <?php echo $bar['page']; ?></td><td><a href="<?php echo $bar['next_link']; ?>">下一页</a></td><td><a href="<?php echo $bar['last_link']; ?>">尾页</a></td></tr></table>
		</td>
	</tr>
<?php
	}
?>
</table>
</form>
</body>
</html>